package Thread;

import java.util.Scanner;

public class SleepDemo {
    public static void main(String[] args) {
        /*System.out.println("程序开始了..");
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("程序结束了");*/

        Scanner scan = new Scanner(System.in);
        System.out.println("请输入：");
        int i = scan.nextInt();
        while (i > 0){
            try {
                Thread.sleep(1000);
                System.out.println(i--);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
